package cn.study.singlethread;

/**
 * @Author     ：跟大佳一起学架构
 * @Description：饿汉式-延迟初始化占位类模式(类加载的时候就实例化)
 */
public class SingleInit {
    private SingleInit(){}
    private static class InstanceHolder{
        private static SingleInit instance = new SingleInit();
    }
    public static SingleInit getInstance(){
        return InstanceHolder.instance;
    }
}
